<template>
    <div>
        <div class="AllOrders">
            <div class="bigbox">
                <div class="title">
                  已支付  
                </div>
                <div class="imgbox" v-for="item in orderList" :key="item.bookId">
                    <div class="img">
                        <img :src="item.bookCover" alt="">
                    </div>

                    <div class="txtbox" >
                        <p class="p">{{item.bookName}}</p>
                        <div class="pricebox">
                            <p>
                                ￥{{item.vipPrice}}
                            </p>
                            <div>
                                X <span>1</span>
                            </div>
                        </div>
                    </div>

                </div>

                <div class="Pay-in-place">
                    <p>实付：</p>
                    <div class="paybox">
                        <span>{{pay}}</span>元
                    </div>
                </div>

               
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        data(){
            return{
                orderList:[],
                pay:"",
            }
        },


    created(){
        this.orderList = JSON.parse(window.localStorage.getItem("buylists"))
        this.pay = JSON.parse(window.localStorage.getItem("total"))
    }
    }
</script>

<style lang="scss" scoped>
.AllOrders{
    .bigbox{
        margin: 20px 20px;
        padding: 14px 10px;
        background-color: #fff;
        border-radius: 4px;
        .title{
            font-size: 15px;
            font-weight: bold;
            color: #000;
            margin-bottom: 20px;
        }
        .imgbox{
            display: flex;
            margin-bottom: 20px;
            .img{
                img{
                    width: 73px;
                    height: 100px;
                }
                margin-right: 10px;
            }

            .txtbox{
                display: flex;
                flex-direction: column;
                flex: 1;
                .p{
                    font-size: 14px;
                    font-weight: bold;
                    padding-bottom: 55px;
                    padding-top: 10px;
                }

                .pricebox{
                    display: flex;
                    justify-content: space-between;
                    p{
                        font-size: 12px;
                        color: #adb6c6;
                    }

                    div{
                        font-size: 12px;
                        color: #adb6c6;
                    }
                }
            }
        }

        .Pay-in-place{
            display: flex;
            justify-content: flex-end;

            p{
                font-size: 13px;
                font-weight: bold;
            }

            .paybox{
                font-size: 13px;
                color: #f74231;
            }
        }
    }
}
</style>